Handle Exception in Java using try Catch Blocks